import {setToken,getToken,removeToken} from '@/utils/setToken.js'
export default { 
    namespaced: true,
    state: () => ({
        isCollapse: false,
        info:JSON.parse(getToken('userinfo') || '[]')
      }),
      actions: {

      },
      mutations:{
        updatefold(state,bld){
          state.isCollapse = bld
        },
        SETINFO(state,val){
          console.log(val);
          state.info = JSON.parse(JSON.stringify(val)) 
          console.log(state.info);
          setToken('userinfo',JSON.stringify(val))
          // state.info = val  
        },
        DELETEINFO(state,val){  
          removeToken('userinfo')
          // removeToken('token')
          
          console.log(1212);
        }
      }
}